import request from '@/utils/request'

// 查询平台抵扣券列表
export function listUserCoupons(query) {
  return request({
    url: '/module/user/coupons/list',
    method: 'get',
    params: query
  })
}

// 查询平台抵扣券详细
export function getUserCoupons(id) {
  return request({
    url: '/module/user/coupons/' + id,
    method: 'get'
  })
}

// 新增平台抵扣券
export function addUserCoupons(data) {
  return request({
    url: '/module/user/coupons',
    method: 'post',
    data: data
  })
}

// 修改平台抵扣券
export function updateUserCoupons(data) {
  return request({
    url: '/module/user/coupons',
    method: 'put',
    data: data
  })
}

// 删除平台抵扣券
export function delUserCoupons(id) {
  return request({
    url: '/module/user/coupons/' + id,
    method: 'delete'
  })
}

// 导出平台抵扣券
export function exportUserCoupons(query) {
  return request({
    url: '/module/user/coupons/export',
    method: 'get',
    params: query
  })
}
